package demo1;

class Animals {
    public final String name;
    public int age;

    public Animals(String name,int age) {
        this.name = name;
        this.age = age;
    }
}

final class Duck extends Animals {

    public Duck(String name,int age) {
        super(name,age);
    }

    public void fly() {
        System.out.println(this.name + " 正在飞！！！");
    }
}
public class Test {
    public static void main(String[] args) {
        Duck duck = new Duck("鸭鸭",18);
        duck.fly();
    }
}
